{% extends 'resume-builder/base.html' %}

{% block title %}{{user.first_name}} {{user.last_name}}{% endblock %}

{% block content %}
<div id="hcard-{{user.first_name}}-{{user.last_name}}" class="vcard">
    <h3 class="fn n">
        <span class="given-name">{{ user.first_name }}</span>
        <span class="family-name">{{ user.last_name }}</span>
    </h3>

    <div class="adr">
        <p class="street-address">{{ user_profile.address.street }}</p>
        <p>
            <span class="locality">{{ user_profile.address.city }}</span>, 
            <span class="region">{{ user_profile.address.province }}</span>,
            <span class="country-name">{{ user_profile.address.country }}</span>
        </p>
    </div>
    <div class="tel"><p>{{ user_profile.address.phone }}</p></div>
    <p><a class="email" href="mailto:{{ user.email }}">{{ user.email }}</a></p>
</div>

<div id="hresume-{{user.first_name}}-{{user.last_name}}" class="hresume">
    <h2>Current Activities</h2>
    <p class="summary">{{ user_profile.current_activities }}</p>
    
    <address class="vcard"></address>

    <h2>Education</h2>
    <ol class="vcalendar">
        {% for education in education_list %}
        <li class="education vevent">
            <h3><a class="url summary" href="{{ education.link }}">{{ education.name }}</a></h3>
            <div class="date_duration">
                <abbr class="dtstart" title="{{ education.start_date|date:"Y-m-d" }}">
                    {{ education.start_date|date:"F j, Y" }}</abbr> -
                <abbr class="dtend" title="{{ education.end_date|date:"Y-m-d" }}">
                    {{ education.end_date|date:"F j, Y" }}</abbr>
            </div>
            <p class="degree">{{ education.degree }}{% if education.minor %} - Minor: {{ education.minor }}{% endif %}</p>
            <p class="description">{{ education.description }}</p>
        </li>
    {% endfor %}
    </ol>

    <h2>Employment</h2>
    <ol class="vcalendar">
        {% for experience in experience_list %}
        <li class="experience vevent vcard">
            <h3 class="title">{{ experience.title }}</h3>
            <p>
                <span class="org">{{ experience.name }}</span>
                <span class="location">{{ experience.location }}</span>
            </p>
            <div class="date_duration">
                <abbr class="dtstart" title="{{ experience.start_date|date:"Y-m-d" }}">
                    {{ experience.start_date|date:"F j, Y" }}</abbr> -
                <abbr class="dtend" title="{{ experience.end_date|date:"Y-m-d" }}">
                    {{ experience.end_date|date:"F j, Y" }}</abbr>
            </div>
            <ol class="summary">
                {% for responsibility in experience.responsibility_set.all %}
                <li><p>{{ responsibility.description }}</p></li>
                {% endfor %}
            </ol>
        </li>
        {% endfor %}
    </ol>

    <h2>Skill Set</h2>
    <div>
        {% for skillheading in skillheading_list %}
        <div class="skillset">
            <h3>{{ skillheading.name }}</h3>
            <ol>
                {% for skill in skillheading.skill_set.all %}
                <li>
                    {% if skill.link %}
                    <a href="{{ skill.link }}">{{ skill.title }}</a>
                    {% else %}
                    <span>{{ skill.name }}</span>
                    {% endif %}
                    {% for project in skill.projects.all %}
                    <span><a href="/projects/{{ project.slug }}/">{{ project.name }}</a></span>
                    {% endfor %}
                </li>
                {% endfor %}
            </ol>
        </div>
        {% endfor %}
    </div>
</div>
{% endblock %}

